#ifndef _SWAP_H_
#define _SWAP_H_

/** This header contains macro definitions to streamline the swapping of data. 
    The main macro defined is SWAP(a,b) that swaps the content of a and b as 
    long as they are of the same type and they support the = operator.

    Notice that the type of the a and b is not passed and it is infered using typeof() 
    operator. 
*/

#define SWAP(a,b) {typeof(a) tmp=a; a=b; b=tmp;}

#endif //_SWAP_H_
